<?php
class setting_edition extends MX_Controller{
	public function index(){
		$adminMenu= $this->load->module('adminMenu/index');

		$setting =$this->load->Module('setting/admin');
		$this->template=$this->config->config['admin_template'];
		
		$editions=self::get_Edition();
		$data=array(
				'update_footer'=>'Starview ',
				'admin_title'=>'Setting Médias',
				'admin_menu'=>$adminMenu->generateAdminMenu(),
				'editions'=>$editions
		);
		
		
		$this->view(
				array('admin-header',
						'setting-edition',
					'admin-footer'),
				$data); // Display the page
	}
	public function edit(){
		$data = $this->input->post('edition');
		$this->model()->edit($data);
		
		$this->load->helper('url');
		redirect('setting/edition');
	}
	public function create(){
		$data = $this->input->post('edition');
		$this->model()->create($data);
		$this->load->helper('url');
		redirect('setting/edition');
	}
	public function get_Edition($name=''){
		return $medias=$this->model()->get_Edition($name);
	}
}